﻿@using EditorialProyectos.Business.Entities.Enum
@using EditorialProyectos.Website.Infrastructure

@{
    ViewBag.Title = "Main";
    if (User.IsInRole("Admin"))
    {
        Layout = "~/Views/Shared/_AdminLayout.cshtml";
    }
    else
    {
        Layout = "~/Views/Shared/_UserLayout.cshtml";
    }
}

@section Scripts{
    @Content.ViewModel("ListViewModel.js", Url)
    @Content.ViewModel("FavoriteProjectViewModel.js", Url)

    <script>
        var viewModel = new FavoriteProjectViewModel();
        ko.applyBindings(viewModel);
    </script>

    @CustomTemplate.ProjectList()
}

<div class="jumbotron color-white">
    <div class="row" data-bind="visible: Main.State.CurrentPage() == 'Info'">
        <div class="col-md-12">
            <h2>FavoriteProject</h2>
            <div data-bind="with: viewModel.List">
                @Html.Partial("_ProjectList")
            </div>
        </div>
    </div>
</div>